<?php
/**
 * 路由文件
 * Created by  yuxianjun001@icloud.com.
 * User: wuchen
 * Date: 2017/12/8
 * Time: 16:10
 */

use NoahBuscher\Macaw\Macaw;


Macaw::get('index','App\admin\controller\Home@index'); //测试参考路由


Macaw::get('test', function() {
    echo "成功！";die;
});

Macaw::get('(:all)', function($fu) {
    echo '未匹配到路由<br>'.$fu;
});

Macaw::error(function() {
    echo '404 :: Not Found';
});

Macaw::$error_callback = function() {

    throw new Exception("路由无匹配项 404 Not Found");

};

Macaw::dispatch();